<script setup>
import { onBeforeMount, onMounted } from 'vue'
import { setThemeTransitionClass } from '@/utils/theme/animation'
import { useTheme } from '@/composables/useTheme'

// 初始化主题系统
const { initTheme } = useTheme()

// 提升暗黑主题下页面刷新视觉体验
onBeforeMount(() => {
  setThemeTransitionClass(true)
})

onMounted(() => {
  initTheme()
  setThemeTransitionClass(false)
})
</script>

<template>
  <router-view />
</template>

<style >
html, body, #app {
  margin: 0;
  height: 100%;
  width: 100%;
}
</style>
